import { defineMock } from '@alova/mock';
import { resultSuccess } from '../_util';

const menusList = [
  {
    path: '/expert-pool',
    name: 'ExpertPool',
    component: 'LAYOUT',
    redirect: '/expert-pool/index',
    meta: {
      icon: 'UserOutlined',
      title: '专家库管理',
      isRoot: true,
    },
    children: [
      {
        path: 'index',
        name: 'expert_pool_index',
        component: '/admin/expert-pool/index',
        meta: {
          title: '专家库管理',
        },
      },
    ],
  },
  {
    path: '/authorization',
    name: 'Authorization',
    component: 'LAYOUT',
    redirect: '/authorization/index',
    meta: {
      icon: 'SafetyOutlined',
      title: '授权管理',
      isRoot: true,
    },
    children: [
      {
        path: 'index',
        name: 'authorization_index',
        component: '/admin/authorization/index',
        meta: {
          title: '授权管理',
        },
      },
    ],
  },
  {
    path: '/meeting-period',
    name: 'MeetingPeriod',
    component: 'LAYOUT',
    redirect: '/meeting-period/index',
    meta: {
      icon: 'CalendarOutlined',
      title: '会议周期管理',
      isRoot: true,
    },
    children: [
      {
        path: 'index',
        name: 'meeting_period_index',
        component: '/admin/meeting-period/index',
        meta: {
          title: '会议周期管理',
        },
      },
    ],
  },
  {
    path: '/position-level',
    name: 'PositionLevel',
    component: 'LAYOUT',
    redirect: '/position-level/title',
    meta: {
      icon: 'ApartmentOutlined',
      title: '职级管理',
    },
    children: [
      {
        path: 'title',
        name: 'position_level_title',
        component: '/admin/title/index',
        meta: {
          title: '职称管理',
        },
      },
      {
        path: 'rank',
        name: 'position_level_rank',
        component: '/admin/rank/index',
        meta: {
          title: '等级管理',
        },
      },
    ],
  },
  {
    path: '/template',
    name: 'Template',
    component: 'LAYOUT',
    redirect: '/template/index',
    meta: {
      icon: 'FileTextOutlined',
      title: '模板管理',
      isRoot: true,
    },
    children: [
      {
        path: 'index',
        name: 'template_index',
        component: '/admin/template/index',
        meta: {
          title: '模板管理',
        },
      },
    ],
  },
  {
    path: '/funding-type',
    name: 'FundingType',
    component: 'LAYOUT',
    redirect: '/funding-type/index',
    meta: {
      icon: 'DollarOutlined',
      title: '经费类型管理',
      isRoot: true,
    },
    children: [
      {
        path: 'index',
        name: 'funding_type_index',
        component: '/admin/funding-type/index',
        meta: {
          title: '经费类型管理',
        },
      },
    ],
  },
  {
    path: '/tax-rules',
    name: 'TaxRules',
    component: 'LAYOUT',
    redirect: '/tax-rules/index',
    meta: {
      icon: 'CalculatorOutlined',
      title: '税费规则',
      isRoot: true,
    },
    children: [
      {
        path: 'index',
        name: 'tax_rules_index',
        component: '/admin/tax-rules/index',
        meta: {
          title: '税费规则',
        },
      },
    ],
  },
  {
    path: '/payment-rules',
    name: 'PaymentRules',
    component: 'LAYOUT',
    redirect: '/payment-rules/index',
    meta: {
      icon: 'CreditCardOutlined',
      title: '支付规则',
      isRoot: true,
    },
    children: [
      {
        path: 'index',
        name: 'payment_rules_index',
        component: '/admin/payment-rules/index',
        meta: {
          title: '支付规则',
        },
      },
    ],
  },
  {
    path: '/operation-logs',
    name: 'OperationLogs',
    component: 'LAYOUT',
    redirect: '/operation-logs/index',
    meta: {
      icon: 'UnorderedListOutlined',
      title: '操作日志',
      isRoot: true,
    },
    children: [
      {
        path: 'index',
        name: 'operation_logs_index',
        component: '/admin/operation-logs/index',
        meta: {
          title: '操作日志',
        },
      },
    ],
  },
];

export default defineMock({
  '/api/menus': () => resultSuccess(menusList),
});
